const parser = require("@babel/parser");
const core = require("@babel/core");
const fs = require("fs");
const main = fs.readFileSync("./main.js", "utf8");
const ast = parser.parse(main, {
  sourceType: "module",
});
const { code } = core.transformFromAst(ast, null, {
  presets: ["@babel/preset-env"],
});
// console.log(ast.program.body);
console.log(code);
